package com.example.SpringBootDemo.service;

import com.example.SpringBootDemo.mapper.MessageMapper;
import com.example.SpringBootDemo.model.MessageInfo;
import org.apache.logging.log4j.message.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageService {
    @Autowired
    MessageMapper messageMapper;
    public void addMessage(MessageInfo messageInfo) {
        messageMapper.addMeesageInfo(messageInfo);
    }

    public List<MessageInfo> getMessage() {
        return messageMapper.getMessageInfo();
    }
}
